home *** CD-ROM | disk | FTP | other *** search
- DLBOX 2.0
- COPYRIGHT 1995 William Hatcher All Rights Reserved
-
- Available functions in library.
-
- The following functions are public for the interface_class object.
-
- ADDBAR
-
- Prototype
-
- void addbar(char *string,int background_color);
-
- Function
-
- Specifies for a title bar to be drawn on the dialog box. The size
- is 20 pixels high and is drawn from 0,0 down on the dialog box.
- The first parameter is the text to be drawn on the bar.
-
- ADDBOX
-
- Prototype
-
- void addbox(int x, int y, int width, int height);
-
- Function
-
- Specifies the dimensions and parameters of the new dialog box.
- Must be given before any of the item commands. The first two
- parameters specify the position of the box in real-screen
- coordinates. The next two values specify the width and height
- of the box.
-
- ADDBUTTON
-
- Prototype
-
- void addbutton(char *string,int x, int y, int item_id,int width);
-
- Function
-
- This function adds a button to the interface. The first parameter
- is a string that is the text to be printed on the button. X and y
- specify the coordinates of the top left of the button. Item_id is
- the item ID number. Width specifies how wide the button is to
- be (in pixels).
-
- ADDCHECKBOX
-
- Prototype
-
- void addcheckbox(char *string, int x, int y, int item_id,
- CHECKBOX_STATUS c);
-
- Function
-
- Adds a checkbox to the dialog box. The first parameter specifies
- the string to be printed beside the box. X and y specify the
- relative coordinates of the checkbox. Item_id is the item ID
- number. The last parameter is the default status of the
- checkbox. CHECKED specifies the box should be checked when
- the dialog box starts. UNCHECKED specifies the opposite.
-
- ADDFIELD
-
- Prototype
-
- void addfield(char *string, int x, int y, int width, int item_id,
- FIELDTYPE f);
-
- Function
-
- This function adds a field to the interface. The first parameter
- specifies a string (optionally zero length) that will be printed
- as default in the field. X and y specify the coordinates of the
- top left of the field. Item_id is the item ID number. Width
- specifies the size of the field in characters. The last parameter
- specifies if it is to be a NUMBER or a TEXT field. Number fields
- return integer numbers and TEXT fields return text strings (up to
- MAXSTRINGLEN). It is recommended to use the TEXT field type
- since it may also be used for numbers including floats. All that
- is necessary is to use one of c's string to number functions.
-
- ADDLINE
-
- Prototype
-
- void addline(int x1,int y1,int x2,int y2,int color);
-
- Function
-
- Specifies a line to be drawn on the dialog box with the specified
- color.
-
- ADDLBOX
-
- Prototype
-
- void addlbox(int x1,int y1,int x2,int y2,int color);
-
- Function
-
- Specifies that a box (made of lines) be drawn on the dialog box
- with the specified color.
-
- ADDPIC_B
-
- Prototype
-
- void addpic_b(int x, int y, int width, int height, int item_id
- void far *p);
-
- Function
-
- Adds a picture button to the dialog box. These function like
- buttons but appear as a bitmapped pictures. The bitmap
- should be saved using Turbo's getimage function (in 16 color
- mode as well). The first two parameters specify the x and y
- coordinates of the top left of the picture. The next two
- specify the width and height of the picture. The next parameter
- is the item ID number. The final parameter is the pointer
- to the image that was used in the getimage function.
-
- ADDPIC_S
-
- Prototype
-
- void addpic_s(int x, int y, void far *p);
-
- Function
-
- This is similar to the addpic_b function. However, this merely
- places a static picture pointed to by p at the coordinates x
- and y.
-
- ADDRADIO
-
- Prototype
-
- void addradio(char *string,int x, int y, int item_id, int radio_id,
- CHECKBOX_STATUS c);
-
- Function
-
- Adds a radio button to the dialog box. The first parameter specifies
- the string to be printed beside the button. X and y specify the
- relative coordinates of the button. Item_id is the item ID
- number. Radio_id is the group id this radio button belongs to.
- The last parameter is the default status of the
- button. CHECKED specifies the button should be checked when
- the dialog box starts. UNCHECKED specifies the opposite.
-
- ADDTITLE
-
- Prototype
-
- void addtitle(char *string, int x, int y, int color, int size,
- int font);
-
- Function
-
- Adds a title to the interface box with the text specified by
- the string pointer. X and y are the upper left coordinates of
- the text. The last three parameters specify the color, size,
- and font to be used.
-
- CLEAR
-
- Prototype
-
- void clear();
-
- Function
-
- Clears out the dialog box information to prepare for a new one.
- Should be called before specifying anything for a new box.
-
- DODIALOG
-
- Prototype
-
- void dodialog();
-
- Function
-
- This function instructs the interface to do the dialog box. Calls
- to obtain data from the box must occur after this statement and
- before the next clear() statement.
-
- GET_BUTTON_INFO
-
- Prototype
-
- int get_button_info(int item_id);
-
- Function
-
- This function returns the status of the button with the
- corresponding item id. 1 means the button was pressed and
- 0 means it was not. Note that only one button can return
- a 1 result.
-
- GET_CHECKBOX_INFO
-
- Prototype
-
- int get_checkbox_info(int item_id);
-
- Function
-
- This function returns the status of the checkbox with the
- corresponding item id. 1 means the checkbox was checked
- and a 0 means it was not.
-
- GET_NUMBER_FIELD_INFO
-
- Prototype
-
- int get_number_field_info(int item_id);
-
- Function
-
- This function returns the integer entered into the given number
- field.
-
- GET_PIC_INFO
-
- Prototype
-
- int get_pic_info(int item_id);
-
- Function
-
- This function returns the status of the picture button with the
- corresponding item id. 1 means the button was pressed and
- 0 means it was not. Note that only one button can return
- a 1 result.
-
- GET_RADIO_INFO
-
- Prototype
-
- int get_radio_info(int item_id);
-
- Function
-
- This function returns the status of the radio button with
- the corresponding item id. 1 means the radio button was
- active and 0 means it was not.
-
- GET_TEXT_FIELD_INFO
-
- Prototype
-
- char * get_text_field_info(int item_id);
-
- Function
-
- This function returns a pointer to the string entered into the
- corresponding text field. This should be copied into a new
- string since it will be erased when the clear() command is issued.
-
- LOCK_MOUSE_IN_BOX
-
- Prototype
-
- void lock_mouse_in_box();
-
- Function
-
- Specifies to lock the mouse inside the dialog box. The mouse will
- be restricted to the perimeter of the dialog box.
-
- PLACE_MOUSE
-
- Prototype
-
- void place_mouse(int x_coordinate, int y_coordinate);
-
- Function
-
- Instructs the dialog box to place the mouse at the given coordinates
- when the dialog box is displayed.
-
- SET_DONT_ERASE
-
- Prototype
-
- void set_dont_erase();
-
- Function
-
- Specifies that the dialog box should not be erased after it is
- exited. This might help in low memory situations since the area
- behind the box is saved. Must be used for dialog boxes whose
- size would exceed 64Kb imagesize.
-
- SET_MOUSE_BOUNDS
-
- Prototype
-
- void (int x1,int y1,int x2,int y2);
-
- Function
-
- Specifies for the dialog box to lock the mouse within the rectangle
- given by the coordinates.
-
- **************
-
- Mouse functions available through interface.
-
- Example call: iface.mouse.show();
-
- BUTTONRELEASE
-
- Prototype
-
- void buttonrelease(unsigned int *button, unsigned int * buttonstatus,
- unsigned int *releases, unsigned int * x, unsigned int *y);
-
- Function
-
- Gets information about button releases. Returns data through
- calling parameter pointers. The first parameter controls which
- button will be checked. If the button pointer points to a 0,
- the left button is checked. If it is 1 the right button is
- checked. *releases is the number of times the button has been
- released since last call. *x and *y are the coordinates at the
- last time the specified button was released.
-
- BUTTONS
-
- Prototype
-
- void buttons(unsigned int *button, unsigned int * buttonstatus,
- unsigned int *presses, unsigned int * x, unsigned int *y);
-
- Function
-
- Gets information about button presses. Returns data through
- calling parameter pointers. The first parameter controls which
- button will be checked. If the button pointer points to a 0,
- the left button is checked. If it is 1 the right button is
- checked. *presses is the number of times the button has been
- pressed since last call. *x and *y are the coordinates at the
- last time the specified button was pressed.
-
- HIDE
-
- Prototype
-
- void hide();
-
- Function
-
- Hides the mouse pointer.
-
- INBOX
-
- Prototype
-
- int inbox(unsigned int x1, unsigned int y1,
- unsigned int x2, unsigned int y2);
-
- Function
-
- Returns 1 if the mouse is inside the box specified by the coordinates
- given. Returns 0 otherwise.
-
- LEFTBUTTONDOWN
-
- Prototype
-
- int leftbuttondown();
-
- Function
-
- Returns 1 if the left button is current depressed or 0 if not.
-
- LEFTBUTTONPRESSED
-
- Prototype
-
- int leftbuttonpressed();
-
- Function
-
- Returns 1 is the left button has been pressed since last call
- or zero of not. Also sets up leftx and lefty values. These
- may be accessed since they are public values.
-
- MOUSEDRIVER
-
- Prototype
-
- void mousedriver(unsigned int*m1,unsigned int*m2,unsigned int*m3,
- unsigned int*m4,unsigned int*m5);
-
- Function
-
- For direct calls to the mouse driver for functions not included
- with the library package.
-
- MRESET
-
- Prototype
-
- int mreset();
-
- Function
-
- Performs a software reset of the mouse function. Returns 1 on
- valid reset and 0 for an invalid reset.
-
- PLACE
-
- Prototype
-
- void place(unsigned int x, unsigned int y);
-
- Function
-
- Places the mouse pointer at the given coordinates.
-
- POSX
-
- Prototype
-
- unsigned int posx();
-
- Function
-
- Returns the current x position of the mouse pointer.
-
- POSY
-
- Prototype
-
- unsigned int posy();
-
- Function
-
- Returns the current y position of the mouse pointer.
-
- READY
-
- Prototype
-
- int read();
-
- Function
-
- Resets the mouse. Returns 1 if mouse is reset an ok. Returns
- 0 if mouse was not reset or is not installed.
-
- RIGHTBUTTONDOWN
-
- Prototype
-
- int rightbuttondown();
-
- Function
-
- Returns 1 if the right button is current depressed or 0 if not.
-
- SETBOUNDS
-
- Prototype
-
- void setbounds(unsigned int xmin,unsigned int xmax,
- unsigned int ymin,unsigned int ymax);
-
- Function
-
- Sets the screen boundaries the mouse will be forced to remain
- within. Note the order of the parameters is x,x,y,y.
-
- SPEED
-
- Prototype
-
- void speed(unsigned int xspeed, unsigned int yspeed);
-
- Function
-
- Sets the mickey/pixel ratio of the mouse.
-
- SHOW
-
- Prototype
-
- void show();
-
- Function
-
- Displays the mouse pointer.
-
- STATUS
-
- Prototype
-
- void status(int *leftbutton,int *rightbutton,
- unsigned int *x,unsigned int *y);
-
- Function
-
- Obtains data about the mouse buttons and mouse position. This
- data is returned via the parameter pointers. The variable pointed
- to by leftbutton will contain 1 if the left mouse button is down
- at the time of the call. Similar situation for the rightbutton.
- The variables pointed to by x and y will contain the x and y
- positions of the mouse at the time of the call.
-
-